import dirStructurePlugin from "@effijs/eslint-plugin-dir-structure";

export default [
  {
    ignores: ["node_modules/**", "dist/**"],
  },
  {
    files: ["src/**/*.js", "eslint.config.js"],
    languageOptions: {
      ecmaVersion: 2020,
      sourceType: "module",
    },
    plugins: {
      "@effijs/dir-structure": dirStructurePlugin,
    },

    rules: {
      "@effijs/dir-structure/enforce-pages-only": [
        "error",
        [
          {
            root: "./src/assets",
            includes: ["react.svg", "index.js"],
          },
          {
            root: "./src",
            includes: [
              "App.css",
              "App.jsx",
              "assets",
              "index.css",
              "main.jsx",
              "test.js",
            ],
            ignores: ["assets"],
          },
        ],
      ],
    },
  },
];
